<template>
  <div>
    <el-table v-loading="loading" :data="infoList" @selection-change="handleSelectionChange">
    <el-table-column type="index" width="55" align="center"  label="序号"/>
    <el-table-column label="考核类型" align="center" prop="trainingType"/>
    <el-table-column label="人员名称" align="center" prop="personnelName" />
    <el-table-column label="身份证号" align="center" prop="identityNumber" />
    <el-table-column label="培训状态" align="center" prop="trainingStatus" >
      <template slot-scope="scope">
        <el-tag :type="scope.row.trainingStatus==0?'info':scope.row.trainingStatus==1?'':'success'">
          {{scope.row.trainingStatus==0?'待开始':scope.row.trainingStatus==1?'培训中':'培训结束'}}
        </el-tag>
      </template>
    </el-table-column>
    <el-table-column label="操作" align="center" class-name="small-padding fixed-width" >
      <template slot-scope="scope">
        <!-- <el-button
          size="mini"
          type="text"
          @click="handleInfo(scope.row)"
        >查看详情</el-button>
        <el-button
          size="mini"
          type="text"
          @click="handleInfo(scope.row)"
        >下载卫生监督意见书</el-button>
        <el-button
          size="mini"
          type="text"
          @click="handleInfo(scope.row)"
        >上传整改文件</el-button> -->
        <el-button
          size="mini"
          type="text"
          @click="handleInfo(scope.row)"
        >处置</el-button>
      </template>
    </el-table-column>
  </el-table>

  <pagination v-show="total > 0" :total="total" :page.sync="queryParams.pageNum" :limit.sync="queryParams.pageSize"
      @pagination="getList" />
  </div>

</template>

<script>
import {educationTrain} from '@/api/radiation/todu'
export default {
  name: 'xzchTable',
  data() {
    return {
      // 遮罩层
      loading: false,
      // 选中数组
      ids: [],
      // 非单个禁用
      single: true,
      // 非多个禁用
      multiple: true,
      // 显示搜索条件
      showSearch: true,
      // 总条数
      total: 0,
      // 一企一档表格数据
      infoList: [
      
      ],
      // 查询参数
      queryParams: {
    pageNum:1,
    pageSize:10
      },
      // 表单参数
    };
  },
  /*props: {
    editVisible: {
      type: Boolean,
      default: () => {
        return false
      }
    }
  },
  watch:{

  },
  computed: {
    show: {
      get () {
        return this.editVisible
      },
      set (val) {
        this.$emit('update:editVisible', val)
      }
    },
  },*/
  methods :{
    handleInfo(row) {

     //  alert("待做")
    },
    handleSelectionChange(val){
      
    },
   async getList(){
      const _this = this
    let res = await educationTrain()
      _this.infoList = res.rows
      _this.total = res.total
     
    }
  },
  certed(){

  },
  mounted(){
    this.getList()
  }

}
</script>

<style>

</style>
